package test.sort;

import java.io.File;
import java.io.FileWriter;
import java.io.IOException;

public class FileUtils {
    File file;
    FileWriter out;

    public FileUtils(String filename) throws IOException {
        file=new File(filename);
        out=new FileWriter(file);

    }

    public void write(int[] raw) throws IOException {
        for (int i = 0; i < raw.length; i++) {
            out.write(raw[i]+"\n");
        }
    }

    public void close() throws IOException {
        out.close();
    }

    public FileWriter getOut() {
        return out;
    }
}
